#ifndef _SEPHYSICSUTIL_H_
#define _SEPHYSICSUTIL_H_
#include <memory>
#include <glm/glm.hpp>
#include <btBulletCollisionCommon.h>
#include <glm/gtc/quaternion.hpp>


namespace SEngine
{  

    template<typename O, typename I>
    O VecCast(I i) {}

    template<>
    inline glm::vec3 VecCast<glm::vec3, btVector3>(btVector3 i) {
        glm::vec3 out;
        out.x = i.getX();
        out.y = i.getY();
        out.z = i.getZ();
        return out;
    }

    template<>
    inline btVector3 VecCast<btVector3, glm::vec3>(glm::vec3 i) {
        btVector3 out;
        out.setX(i.x);
        out.setY(i.y);
        out.setZ(i.z);
        return out;
    }

    template<>
    inline btQuaternion VecCast<btQuaternion, glm::quat>(glm::quat i) {
        btQuaternion out;
        out.setX(i.x);
        out.setY(i.y);
        out.setZ(i.z);
        out.setW(i.w);
        return out;
    }

    template<>
    inline glm::quat VecCast<glm::quat, btQuaternion>(btQuaternion i) {
        glm::quat out;
        out.x = i.getX();
        out.y = i.getY();
        out.z = i.getZ();
        out.w = i.getW();
        return out;
    }

} // namespace SEngine


#endif